= form_for resource, as:           resource_name,
                     url:          session_path(resource_name),
                     html:         {class: "block-form"},
                     autocomplete: "off" do |f|
  %fieldset
    - if mobile
      %legend
        = image_tag("branding/logos/header-logo2x.png", height: 40, width: 40)
        = t("devise.sessions.new.login")

    - if mobile
      %label#usernameLabel{for: "user_username"}
        = t("registrations.new.username")
    - else
      %label.sr-only#usernameLabel{for: "user_username"}
        = t("registrations.new.username")
      %i.entypo-user
    = f.text_field :username,
                   placeholder: t("registrations.new.username"),
                   class: "input-block-level form-control",
                   required: true,
                   pattern: "[A-Za-z0-9_.@\-]+",
                   autocapitalize: "none",
                   autocorrect: "off",
                   autofocus: true,
                   aria: {labelledby: "usernameLabel"}

    - if mobile
      %label#passwordLabel{for: "user_password"}
        = t("registrations.new.password")
    - else
      %label.sr-only#passwordLabel{for: "user_password"}
        = t("registrations.new.password")
      %i.entypo-lock
    = f.password_field :password,
                       placeholder: t("registrations.new.password"),
                       class: "input-block-level form-control",
                       required: true,
                       autocapitalize: "none",
                       autocorrect: "off",
                       aria: {labelledby: "passwordLabel"}

  = f.hidden_field :remember_me, value: 1
  = f.submit t("devise.sessions.new.sign_in"), class: "btn btn-large btn-block btn-primary"
